package com.xianniu.ltc.feign.hystrix;

import com.xianniu.ltc.feign.api.ThirdPartyService;
import com.xxl.sso.core.entity.ReturnT;
import com.xianniu.ltc.model.po.QccFuzzySearchPO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * @author wrj
 * @version 1.0
 * @description: < 三方项目 Feign调用熔断机制 >
 * @date 2021/8/31 10:51
 */
@Slf4j
@Component
public class ThirdPartyServiceHystrix implements ThirdPartyService {

    @Override
    public ReturnT fuzzySearch(@RequestBody QccFuzzySearchPO po, @RequestHeader("xnToken") String token){
        return new ReturnT(ReturnT.FAIL_CODE, "服务异常了～～");
    }

}
